#include <stdio.h>

// 1 + 1/2 - 1/3 + 1/4 ... + 1/n

int main()
{
    int n, m = 1, sign = -1;
    double sum = 1;
    scanf("%d", &n);
    while (m < n)
    {
        m = m + 1;
        sign = -1 * sign;
        sum = sum + 1.0 / m*sign;
    }
    printf("%.3lf", sum);
    return 0;
}